<h1>
<span>
	Game yêu thích
</span>
</h1>
<div class="game-favo">
	<ul>
		<?php 
			$count = 0;
			if (isset($games) && $games) {
				foreach ($games as $game ) {
				?>
				<li class="fvfame-<?php echo $game->game_id; ?>">
					<div class="gamebox_head_wrapper">
						<div class="gamebox_image">
							<a href="<?php echo base_module_url('user_game_favorites', 'remove_favorite/'. $game->game_id); ?>" rel="nofollow" id="remove_favorite" class="btn_favorite" data-id="<?php echo $game->game_id; ?>">
								
							</a>  
							<a class="game-item" href="<?php echo game_url($game->game_id, $game->game_code); ?>"><img src="<?php echo $game->game_thumb; ?>" height="60" width="72" alt="<?php echo $game->game_title; ?>" align="left"></a> 
						</div>
						<div class="gamebox_info">
							<div class="gamebox_title"> 
							
								<a href="<?php echo game_url($game->game_id, $game->game_code); ?>" rel="bookmark" title="<?php echo $game->game_title; ?>">
							<?php echo $game->game_title; ?></a> 
							
							</div>
						</div>
					</div>
				</li>
				
				<?php 
				}
			}
		?>
		
		<div class="clear"></div>
	</ul>
</div>
<style type="text/css">a.btn_favorite{
	display: none; position: absolute; margin-top: -4px;margin-left: -40px;width: 28px;height: 28px; background: url(<?php echo $this->template->url_theme;?>images/remove.png);}.game-favo {margin-top: 10px;}
	a.btn_favorite:hover{visibility:visible;}
</style>
<script type="text/javascript">
	$(function(){
		$('a.btn_favorite').click(function (){
			$.get(this.href, function(re){});
			$('.fvfame-'+$(this).attr('data-id')).remove();
			return false;
		});
		$('.gamebox_image').hover(function(){
			$(this).find('.btn_favorite').show();
		}, function (){
			$(this).find('.btn_favorite').hide();
		} );
	})
</script>